package com.egreen.common.pojo.VO.pointsmall;


import com.egreen.common.pojo.entity.pointsmall.Product;
import com.egreen.common.pojo.entity.pointsmall.ProductCategory;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class ProductCategoryVO implements Serializable {
    //商品id
    private Integer id;
    //商品名称
    private String name;
    private Integer parentId;
    //商品的子菜单
    private List<ProductCategoryVO> children;
    //一级分类所属的商品的集合
    private List<Product>productList;


    public ProductCategoryVO(ProductCategory productCategory) {
        this.id = productCategory.getId();
        this.name = productCategory.getName();
        this.parentId = productCategory.getParentId();
    }
}
